import { request } from '@/utils/request.js'

/**
 * 司机提货订单管理 API JS
 */

export default {

  /**
   * 获取司机提货订单管理分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'prediction/deriverOrder/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加司机提货订单管理
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'prediction/deriverOrder/save',
      method: 'post',
      data
    })
  },

  /**
   * 更新司机提货订单管理数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'prediction/deriverOrder/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取司机提货订单管理
   * @returns
   */
  read (id) {
    return request({
      url: 'prediction/deriverOrder/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 将司机提货订单管理删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'prediction/deriverOrder/delete',
      method: 'delete',
      data
    })
  },

  /**
   * 从回收站获取司机提货订单管理数据列表
   * @returns
   */
  getRecycleList (params = {}) {
    return request({
      url: 'prediction/deriverOrder/recycle',
      method: 'get',
      params
    })
  },

  /**
   * 恢复司机提货订单管理数据
   * @returns
   */
  recoverys (data) {
    return request({
      url: 'prediction/deriverOrder/recovery',
      method: 'put',
      data
    })
  },

  /**
   * 真实删除司机提货订单管理
   * @returns
   */
  realDeletes (data) {
    return request({
      url: 'prediction/deriverOrder/realDelete',
      method: 'delete',
      data
    })
  },

  /**
   * 更改司机提货订单管理数据
   * @returns
   */
  changeStatus (data = {}) {
    return request({
      url: 'prediction/deriverOrder/changeStatus',
      method: 'put',
      data
    })
  },

  /**
   * 修改司机提货订单管理数值数据，自增自减
   * @returns
   */
  numberOperation (data = {}) {
    return request({
      url: 'prediction/deriverOrder/numberOperation',
      method: 'put',
      data
    })
  },

  /**
   * 司机提货订单管理导出
   * @returns
   */
  exportExcel (params = {}) {
    return request({
      url: 'prediction/deriverOrder/export',
      method: 'post',
      responseType: 'blob',
      params
    })
  },

  /**
    * 司机提货订单管理导入
    * @returns
    */
  importExcel (data = {}) {
    return request({
      url: 'prediction/deriverOrder/import',
      method: 'post',
      data
    })
  },

  /**
   * 司机提货订单管理下载模板
   * @returns
   */
  downloadTemplate () {
    return request({
      url: 'prediction/deriverOrder/downloadTemplate',
      method: 'post',
      responseType: 'blob'
    })
  },

  /**
   * 获取出门条编号
   * @returns
   */
  getGerNo (params = {}) {
    return request({
      url: 'prediction/printLog/getNo',
      method: 'get',
      params
    })
  },
  /**
   * 记录出门条编号
   * @returns
   */
  getprintSave (data) {
    return request({
      url: 'prediction/printLog/save',
      method: 'post',
      data
    })
  },
  // prediction/printLog/getCount
  getCount (params = {}) {
    return request({
      url: 'prediction/printLog/get_count',
      method: 'get',
      params
    })
  },
  /**
   * 司机订单取消
   * @returns
   */
  getcancelOrder (params = {}) {
    return request({
      url: 'prediction/deriverOrder/cancelOrder',
      method: 'get',
      params
    })
  },
}